﻿
using UnityEditor.Experimental.GraphView;
using UnityEngine;

namespace Gameplay.CharacterFramework
{
    public class RockProjectile:Projectile
    {
        protected override void Awake()
        {
            base.Awake();
        }

        public override void Shoot(Vector3 direction, float speed)
        {
            _rb.AddForce(direction*speed,ForceMode.Force);
        }

        protected override void OnTriggerEnter(Collider other)
        {
            base.OnTriggerEnter(other);
            if (other.CompareTag("Ground")) 
            {
                _rb.velocity = Vector2.zero;
                GameObject.Destroy(this.gameObject,1);
            }
           
        }

        
    }
}
